package com.hui;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * Springboot 启动类
 *
 * @author Hui
 */
@SpringBootApplication
@EnableEurekaServer
public class HuiEurekaApplication {
    private static Logger logger = LoggerFactory.getLogger(HuiEurekaApplication.class);

    public static void main(String[] args) {

        SpringApplication.run(HuiEurekaApplication.class, args);
        logger.info("Eureka启动成功");


    }

    @EnableWebSecurity
    public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http.csrf().disable();
            super.configure(http);
        }
    }

}
